package com.lidroid.xutils.util;

import android.webkit.MimeTypeMap;
import cn.qqtheme.framework.adapter.FileAdapter;

/* loaded from: classes.dex */
public class MimeTypeUtils {
    private MimeTypeUtils() {
    }

    public static String getMimeType(String str) {
        int lastIndexOf = str.lastIndexOf(FileAdapter.DIR_ROOT);
        if (lastIndexOf != -1) {
            return MimeTypeMap.getSingleton().getMimeTypeFromExtension(str.substring(lastIndexOf + 1));
        }
        return "application/octet-stream";
    }
}
